__________________________________________________________________________________________________
class Solution {
    public int minSwaps(int[] data) {
        int c1 = 0;
        for (int i : data)
            c1+=i;
        int c0m = 0;
        int cur = 0;
        for (int i = 0; i < c1; i++) {
            cur++;
            cur-=data[i];
        }
        c0m = cur;
        for (int i = c1; i < data.length; i++) {
            cur += data[i-c1];
            cur -= data[i];
            c0m = Math.min(c0m, cur);
        }
        return c0m;
    }
}
__________________________________________________________________________________________________

__________________________________________________________________________________________________
